<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::group(['middleware' => ['web'],'prefix' => 'client',], function () {
    Route::get('/user', function () {
//        $user = session('wechat.oauth_user.default'); //
//
//        dd($user);
        var_dump(111);
    });
});


//公共接口
Route::group(['middleware' => ['web'],'prefix' => 'common','namespace' => 'Common'], function () {
    //图片上传
    Route::post('/upload_img', 'CommonController@uploadImg');

    //获取accessToken
    Route::post('/access_token', 'CommonController@getAccessToken');
});

